package toolkit;

public class Random extends java.util.Random
{
	private static Random random = new Random();
	
	public static boolean chance(int percentage)
	{
		if (percentage <= 0)
		{
			return false;
		}
		
		if (percentage >= 100 || random.nextInt(100) < percentage)
		{
			return true;
		}
		
		return false;
	}
	
	public static int random(int min, int max)
	{
		return (int) Math.floor(Math.random() * (max - min + 1)) + min;
	}
}
